package org.jeecg.modules.sys_captcha.service;

import com.baomidou.mybatisplus.extension.service.IService;
import org.jeecg.modules.sys_captcha.entity.SysCaptcha;

import java.awt.image.BufferedImage;
import java.util.Date;

public interface ISysCaptchaService extends IService<SysCaptcha> {

    /**
     * 生成验证码
     */
    BufferedImage generateCaptcha(String uuid);

    /**
     * 验证验证码
     */
    boolean validate(String uuid, String code);

    /**
     * 清除过期验证码
     */
    void clearExpiredCaptchas(Date now);
}

